package com.ruoyi.bookbus.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bookbus.mapper.BookForumTopicMapper;
import com.ruoyi.bookbus.domain.BookForumTopic;
import com.ruoyi.bookbus.service.IBookForumTopicService;

/**
 * 论坛主题Service业务层处理
 * 
 * @author zsq-cj
 * @date 2025-10-21
 */
@Service
public class BookForumTopicServiceImpl implements IBookForumTopicService 
{
    @Autowired
    private BookForumTopicMapper bookForumTopicMapper;

    /**
     * 查询论坛主题
     * 
     * @param id 论坛主题主键
     * @return 论坛主题
     */
    @Override
    public BookForumTopic selectBookForumTopicById(Long id)
    {
        return bookForumTopicMapper.selectBookForumTopicById(id);
    }

    /**
     * 查询论坛主题列表
     * 
     * @param bookForumTopic 论坛主题
     * @return 论坛主题
     */
    @Override
    public List<BookForumTopic> selectBookForumTopicList(BookForumTopic bookForumTopic)
    {
        return bookForumTopicMapper.selectBookForumTopicList(bookForumTopic);
    }

    /**
     * 新增论坛主题
     * 
     * @param bookForumTopic 论坛主题
     * @return 结果
     */
    @Override
    public int insertBookForumTopic(BookForumTopic bookForumTopic)
    {
        return bookForumTopicMapper.insertBookForumTopic(bookForumTopic);
    }

    /**
     * 修改论坛主题
     * 
     * @param bookForumTopic 论坛主题
     * @return 结果
     */
    @Override
    public int updateBookForumTopic(BookForumTopic bookForumTopic)
    {
        return bookForumTopicMapper.updateBookForumTopic(bookForumTopic);
    }

    /**
     * 批量删除论坛主题
     * 
     * @param ids 需要删除的论坛主题主键
     * @return 结果
     */
    @Override
    public int deleteBookForumTopicByIds(Long[] ids)
    {
        return bookForumTopicMapper.deleteBookForumTopicByIds(ids);
    }

    /**
     * 删除论坛主题信息
     * 
     * @param id 论坛主题主键
     * @return 结果
     */
    @Override
    public int deleteBookForumTopicById(Long id)
    {
        return bookForumTopicMapper.deleteBookForumTopicById(id);
    }
}
